#include <stdlib.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <fcntl.h>

int main(int argc, char **argv)
{

    int fd;
    off_t off;
    char c;
    int num;
    if ((fd = open("abc.txt", O_RDONLY)) == -1)
    {
        perror("open file is error");
        exit(-1);
    };
    off = lseek(fd, 4, SEEK_CUR);
    printf(" 当前位置是：%ld\n", off);
    while ((num = read(fd, &c, sizeof(char))) > 0)
    {

        printf(" 此时读的字符是：%c \n", c);
    }

    return 0;
}